﻿namespace PreGUI.Attributes
{
    using System;

    /// <summary>
    /// Assigns the submitted value of an input control to a property on the bound view model.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
    sealed class ControlValueTargetAttribute : Attribute
    {
        readonly string _controlName;

        public ControlValueTargetAttribute(string controlName)
        {
            _controlName = controlName;
        }

        public string ControlName
        {
            get { return _controlName; }
        }

    }
}